Skip to content

Conversation

etienne-lms
Copy link
Contributor

@etienne-lms etienne-lms commented Sep 9, 2025

This P-R mainly adds 'ns' variant for 2 STM32WBA65xx based ST boards and also adds wkup_pin ST sample on nucleo_wba65ri.

  • Add stm32wba65i_dk1 boards and an 'ns' variant for this board.
  • Refine nucleo_wba65ri documentation, add wake-from-poweroff demo for this board and the board 'ns' variant
  • Add PSA Arch test for WBA65xx based boards (deps on psa-arch-tests#13)
    Edited: this update is postponed to a later dedicated P-R.

This P-R is based on the recently merged TF-M/STM32 updates by zephyrproject-rtos/trusted-firmware-m#145 and #93520.

This P-R supersedes #90162.

@zephyrbot zephyrbot added area: ADC Analog-to-Digital Converter (ADC) platform: STM32 ST Micro STM32 area: Samples Samples area: TF-M ARM Trusted Firmware-M (TF-M) labels Sep 9, 2025
Copy link

github-actions bot commented Sep 9, 2025

The following west manifest projects have changed revision in this Pull Request:

Name Old Revision New Revision Diff

All manifest checks OK

Note: This message is automatically posted and updated by the Manifest GitHub Action.

@etienne-lms
Copy link
Contributor Author

Rebased to fix merge conflict in nucleo_wba65ri board doc. No other changes.

erwango
erwango previously approved these changes Sep 30, 2025
Declare stm32wba65i-dk1 and nucleo_wba65ri boards support in TF-M.
Both comply with TF-M integration of platform stm/stm32wba65i-dk.

Signed-off-by: Etienne Carriere <[email protected]>
Add TF-M directive STM32_FLASH_LAYOUT_BEGIN_OFFSET needed to specify
the gap needed by external boot stage resources at flash beginning.
The offset tells STM32 TF-M firmware the base offset in the flash
where the several TF-M and non-secure image areas shall be located.

The CMake directive was introduced mainline TF-M commit [1] and merged
in Zephyr TF-M repository [2].

Link: TrustedFirmware-M/trusted-firmware-m@fc035b8 [1]
Link: zephyrproject-rtos/trusted-firmware-m@954dc80 [2]
Signed-off-by: Etienne Carriere <[email protected]>
@etienne-lms
Copy link
Contributor Author

Review comments addressed. Diff here.

mathieuchopstm
mathieuchopstm previously approved these changes Oct 1, 2025
Copy link
Contributor

@mathieuchopstm mathieuchopstm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocker, LGTM otherwise

Comment on lines +11 to +14
config TFM_BL2_NOT_SUPPORTED
default y

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: per https://github.com/zephyrproject-rtos/zephyr/pull/95722/files#r2382368514, maybe

Suggested change
config TFM_BL2_NOT_SUPPORTED
default y
# BL2 implementation not available yet
config TFM_BL2_NOT_SUPPORTED
default y

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense.

Enable TFM_BL2_NOT_SUPPORTED configuration for STM32WBA65x SoC since
TF-M does not implement the BL2 boot stage for this SoC series.

Signed-off-by: Etienne Carriere <[email protected]>
Add variant ns to stm32wba65i_dk1 board to embed TF-M in the SoC
secure world. The flash layout is synced with the layout defined
in Zephyr TF-M integration of platform STM32WBA65I.

Successfully tested against a few samples and test samples:
- samples/tfm_integration/psa_crypto
- samples/tfm_integration/psa_protected_storage
- samples/tfm_integration/tfm_ipc
- samples/tfm_integration/tfm_regression_test
- samples/tfm_integration/tfm_secure_partition
- tests/subsys/secure_storage/psa/crypto
- tests/subsys/secure_storage/psa/its
  (with CONFIG_TFM_ITS_MAX_ASSET_SIZE_OVERRIDE=y
  and CONFIG_TFM_ITS_MAX_ASSET_SIZE=256)

Support for PSA Arch Tests (samples/tfm_integration/tfm_psa_test) is
not yet merged but is in under review [1].

Link: ARM-software/psa-arch-tests#406 [1]
Signed-off-by: Etienne Carriere <[email protected]>
Rename nucleo_wba65ri board documentation file for consistency
within Zephyr file tree.

Signed-off-by: Etienne Carriere <[email protected]>
Replace (R) and (TM) special charaters with |reg| and |trade|
aliases in nucleo_wba65ri board documentation file. By the way
also fix some characters case, add info and move Cortex-M description
in the overview section to prevent information duplication.

Signed-off-by: Etienne Carriere <[email protected]>
Add missing low power consumption numbers in nucleo_wba65ri board
documentation. These numbers are dumped from the SoC datashhet.

Signed-off-by: Etienne Carriere <[email protected]>
Add variant 'ns' to nucleo_wba65ri board to embed TF-M in the SoC
secure world.

The flash layout is synced with the layout defined in Zephyr TF-M
integration of platform STM32WBA65I.

- samples/tfm_integration/psa_crypto
- samples/tfm_integration/psa_protected_storage
- samples/tfm_integration/tfm_ipc
- samples/tfm_integration/tfm_regression_test
- samples/tfm_integration/tfm_secure_partition
- tests/subsys/secure_storage/psa/crypto
- tests/subsys/secure_storage/psa/its
  (with CONFIG_TFM_ITS_MAX_ASSET_SIZE_OVERRIDE=y
  and CONFIG_TFM_ITS_MAX_ASSET_SIZE=256)

Support for PSA Arch Tests (samples/tfm_integration/tfm_psa_test) is
not yet merged but is in under review [1].

Link: ARM-software/psa-arch-tests#406 [1]
Signed-off-by: Etienne Carriere <[email protected]>
Add WBA65RI Nucleo board to ST wkup_pins board sample.
By the way, sort the board names in sample.yaml.

Signed-off-by: Etienne Carriere <[email protected]>
@etienne-lms
Copy link
Contributor Author

Comment addressed.

Copy link

sonarqubecloud bot commented Oct 1, 2025

@rjayles
Copy link
Contributor

rjayles commented Oct 3, 2025

I have tested your PR on both nucleo_wba65ri & stm32wba65i_dk1 for all samples in tfm_integration except tfm_psa_test as mentioned in your comment and it's all good for me.

@etienne-lms
Copy link
Contributor Author

Thanks @rjayles.

@erwango
Copy link
Member

erwango commented Oct 6, 2025

@d3zd3z PTAL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: ADC Analog-to-Digital Converter (ADC) area: Boards/SoCs area: Flash area: Samples Samples area: TF-M ARM Trusted Firmware-M (TF-M) platform: STM32 ST Micro STM32 Release Notes To be mentioned in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants